// 基于template/src/views/{{appModules}}/{{pages@DEGRIDVIEW}}/{{spinalCase page.codeName}}-model.ts.hbs生成
import { IGridViewModel } from '@/core/interface/view/model';

function getModel(): IGridViewModel {
	return {
		caption: '系统信息',
		title: '系统管理',
		capPSLanguageRes: 'DE.LNAME.SYS_DEPLOY_SYSTEM',
		titlePSLanguageRes: 'PAGE.TITLE.SYS_DEPLOY_SYSTEM.GRIDVIEW',
		showDataInfoBar: false,
		codeName: 'sys_deploy_systemGridView',
		uiEngineModel: [
			{
				name: 'toolbar_deuiaction2_click',
				triggerType: 'CTRLEVENT',
				logicType: 'APPVIEWUIACTION',
				eventNames: 'CLICK',
				scriptCode: ``,
				logicName: ``,
				logicTag: '',
				eventArg: 'deuiaction2',
				eventArg2: '',
				timer: 0,
				psViewCtrlName: 'toolbar',
				uIActionTag: 'New',
				entityCodeName: '',
			},
			{
				name: 'newdata',
				triggerType: 'CUSTOM',
				logicType: 'SYSUILOGIC',
				eventNames: '',
				scriptCode: ``,
				logicName: ``,
				logicTag: '',
				eventArg: '',
				eventArg2: '',
				timer: 0,
				psViewCtrlName: '',
				entityCodeName: '',
			},
			{
				name: 'opendata',
				triggerType: 'CUSTOM',
				logicType: 'SYSUILOGIC',
				eventNames: '',
				scriptCode: ``,
				logicName: ``,
				logicTag: '',
				eventArg: '',
				eventArg2: '',
				timer: 0,
				psViewCtrlName: '',
				entityCodeName: '',
			},
		],
		ctrls: [
			{
				name: 'searchform',
				codeName: 'Default',
				controlType: 'SEARCHFORM',
			},
			{
				name: 'grid',
				codeName: 'Main',
				controlType: 'GRID',
			},
			{
				name: 'toolbar',
				codeName: 'GridViewtoolbar',
				controlType: 'TOOLBAR',
			},
		],
		ctrlParams: {
			Sys_deploy_systemsearchform: {},
			Sys_deploy_systemgrid: {},
			Sys_deploy_systemtoolbar: {},
		},
		cssName: '',
		name: 'sys_deploy_systemGridView',
		viewType: 'DEGRIDVIEW',
		viewStyle: 'DEFAULT',
		showCaption: true,
		isLoadDefault: true,
		entityCodeName: 'Sys_deploy_system',
		keyPSAppDEField: 'Id',
		majorPSAppDEField: 'Display_name',
		funcViewMode: 'MDATAVIEW',
		enableQuickSearch: true,
		expandSearchForm: false,
		newData: {
			deCodeName: 'Sys_deploy_system',
			newDataViewName: 'sys_deploy_systemEditView',
		},
		openData: {
			deCodeName: 'Sys_deploy_system',
			openDataViewName: 'sys_deploy_systemEditView',
		},
		toolbarItems: [
			{
				actionLevel: '100',
				caption: '新建系统',
				captionLanResTag: 'TBB.TEXT.*.NEW',
				name: 'deuiaction2',
				showCaption: true,
				tooltip: '新建系统',
				tooltipLanResTag: 'TBB.TOOLTIP.*.NEW',
				itemType: 'DEUIACTION',
				showIcon: true,
				disabled: false,
				cssName: '',
				imagePath: '',
				iconCls: 'fa fa-file-text-o',
				imagePathX: '',
				dataAccessAction: '',
				noPrivDisplayMode: 2,
				uiAction: {
					codeName: 'New',
					uIActionMode: 'SYS',
					actionTarget: '',
					uIActionTag: 'New',
					uIActionType: 'DEUIACTION',
				},
				logic: {
					name: 'toolbar_deuiaction2_click',
					actionTag: 'New',
					xDataCtrlName: 'grid',
					predefinedType: 'EDITVIEW_NEWACTION',
				},
			},
		],
		xDataCtrlName: 'grid',
		quickSearchPlaceholder: ['系统标识', '系统名', '系统显示名称'].join(','),
		useDefaultLayout: true,
		enableRowEdit: false,
		rowActiveMode: 2,
		rowEditDefault: false,
	};
}

export const model = getModel();
